function [div x] = gmm_kl_mc(f, g, nsamples)

x = gmmsamp(f, nsamples);
fx = gmmprob(f, x);
gx = gmmprob(g, x);

div = sum(log(fx+realmin)-log(gx+realmin)) / nsamples;
